home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
cpp_libs
/
linklist
/
source.lha
/
doc
/
lFndNode.3
< prev
next >
Wrap
Text File
|
1993-08-08
|
2KB
|
65 lines
'.so tmac.clman
.TH "lFndNode"
.IX lFndNode
.SH NAME
lFndNode - Find node.
.SH SYNOPSIS
int
.BR "lFndNode" "(id, from, func, ptr, data, size)"
.br
.RT
.RP
In int id identifier of linked list
.br
.RP
In int from from where must be searched
.br
.RP
In int (*func)() function for checking the data on conditions
.br
.RP
In Byte *ptr data for comparison in function
.br
.RP
Out Byte *data data of node
.br
.RP
In int size size of data
.DT
.SH DESCRIPTION
\fBlFndNode\fP searches a node from the linked list, using the user
defined serach function \fIfunc\fP, which checks the data of a node
on conditions. This function must have two parameters, a pointer to
the data to compare with and a pointer to the data of a node. The
possible return values are lFOUND or lNOT_FOUND. See the introduction
of Generic Linked List for an example of such a search function. From
where the node must be searched can be specified by \fIfrom\fP. A node
can be searched forward from the beginning of the list or from the
current node and backward from the current node or from the end of the
list.
.br
Backward searching is only possible for doubly linked list.
.br
When the found node is the first or the last node, the return code will
have the value lFIRST or lLAST, otherwise lFOUND.
.SH PARAMETER DEFINITIONS
.if t .ta 0.2i 1.5i
\fIfrom\fP :
.nf
lFIRST search forward from first node
lPREVIOUS search backward from previous node
lNEXT search forward from next node
lLAST search backward from last node
.fi
.SH RETURN CODES
.nf
Return on success :
lFOUND, lFIRST, lLAST, lNOT_FOUND
Return on error :
.fi
.in +0.2i
lUNKNOWN_ID, lEMPTY_LIST, lWRONG_FROM, lUNKNOWN_FUNC, lNOT_DOUBLY
.in 10.2i
.SH AUTHOR
Anita Eijs (TNO - Bouw - BouwInformatica)